/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 dialog_campaign_score.h

	$Header: /resource_editor/dialog_campaign_score.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined(DIALOG_CAMPAIGN_SCORE_H_INCLUDED)
#define DIALOG_CAMPAIGN_SCORE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmap_group_ptr.h"
#include "bitmap_layer_window.h"
#include "button_group.h"
#include "creature_type.h"

class t_adventure_map;
class t_button;
class t_scrollbar;
class t_text_window;


class t_dialog_campaign_score : public t_bitmap_layer_window
{
public:
	t_dialog_campaign_score( t_adventure_map* last_map, std::string const & player_name, t_window* parent );

	void		 close_click( t_button* );
	void		 create_buttons();
	void		 create_title();
	void		 gather_data( t_adventure_map const * last_map );
	void		 scroll( t_scrollbar* scrollbar, int line );

protected:
	struct t_line_display
	{
		t_bitmap_layer_window*	frame;
		t_text_window*			map_name;
		t_text_window*			score_display;
	};

	struct t_line_data
	{
		std::string		map_name;
		std::string		score_string;
	};

	
	t_creature_type						m_campaign_creature_index;
	int									m_campaign_days;
	std::string							m_campaign_name;
	int									m_campaign_score;
	std::vector<t_line_data>			m_data;				// Set of map names and scores
	t_bitmap_group_ptr					m_layout;
	std::vector<t_line_display>			m_line_items;		// Set of line display objects
	t_button*							m_ok_button;
	std::string							m_player_name;
	t_scrollbar*						m_scrollbar;
	int									m_score_average;
	int									m_top_line;         // first visible item
};

#endif // DIALOG_CAMPAIGN_SCORE_H_INCLUDED